package pl.koziolekweb.szkola.CEAbstrakcyjne;

// CE-Abstrakcyjne/Prostokat.java
 
public class Prostokat extends Figura {
    private double a, b;

    public Prostokat(double a, double b) {
        this.a = a;
        this.b = b;
    }

    public double getPole()  { return a*b; }
    public double getObwod() { return 2*(a+b); }

    @Override
    public String toString() {
        return "Prostokat (a=" + a + " b=" + b + ")"
              + super.toString();
    }
}
